package com.example.zhengchaojun.arcgis.test;

import android.os.Bundle;

import com.esri.arcgisruntime.layers.ArcGISTiledLayer;
import com.esri.arcgisruntime.layers.WebTiledLayer;
import com.esri.arcgisruntime.mapping.ArcGISScene;
import com.esri.arcgisruntime.mapping.Basemap;
import com.esri.arcgisruntime.mapping.view.SceneView;
import com.example.zhengchaojun.arcgis.R;

/**
 * 类描述：三维地图,天地图
 * 作者：郑朝军 on 2018/5/10
 * 邮箱：1250393285@qq.com
 * 公司：武汉智博创享科技有限公司
 * 修改人：郑朝军 on 2018/5/10
 * 修改备注：
 */
public class ArcgisSceneMapSolidActivity extends BaseTianMapActivity
{
    protected SceneView m_sceneView;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_solid);
        m_sceneView = (SceneView) findViewById(R.id.sceneView);
        test2();
        m_sceneView.setAttributionTextVisible(false);
    }

    public void test()
    {
        ArcGISScene scene = new ArcGISScene();
        WebTiledLayer webTiledLayer = CreateTianDiTuTiledLayer3();
        Basemap tdtBasemap = new Basemap(webTiledLayer);
        WebTiledLayer webTiledLayer1 = CreateTianDiTuTiledLayer4();
        tdtBasemap.getBaseLayers().add(webTiledLayer1);
        scene.setBasemap(tdtBasemap);
        m_sceneView.setScene(scene);
    }

    public void test2()
    {
        ArcGISScene mainScene = new ArcGISScene();
        Basemap jtBasemap = new Basemap(new ArcGISTiledLayer("http://map.geoq.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer"));
        mainScene.setBasemap(jtBasemap);
        m_sceneView.setScene(mainScene);
    }
}
